home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 21
/
CU Amiga Magazine's Super CD-ROM 21 (1998)(EMAP Images)(GB)[!][issue 1998-04].iso
/
CDSupport
/
IDer
/
Routines
/
ProcessName.s
< prev
next >
Wrap
Text File
|
1997-02-18
|
752b
|
30 lines
ProcessName: Move.L _Name(PC),A0 ;was a NAME entry included
Cmp.L #0,A0
Beq.S .NoName
Lea WorkData,A1
Bsr StripQuotes ;copy the string into a working buffer
Move.L #WorkData,D1
Move.L #ParseData,D2
Move.L #255,D3
CALL ParsePatternNoCase,DOS ;tokinize any wildcards that may be present
Cmp.L #-1,D0
Beq.S .BadName
Move.L #ParseData,D1
Move.L _FilePart(PC),D2
CALL MatchPatternNoCase ;try and match filename with NAME entry
Tst.L D0
Beq.S .BadName
Addq.B #1,_Successful ;yeah. the file passed the check
Cmp.B #MODE_ONE,_Mode ;check what mode we are in
Beq LaunchAction ;run ACTION if in OR mode
Bra.S .NoName
.BadName Cmp.B #MODE_ALL,_Mode ;are we running in OR mode
Beq CheckLoop ;if not, then abort the search
.NoName